
import 'package:flutter/services.dart';

import 'demo_scan_platform_interface.dart';

class DemoScan {

  /// 通道名，需和iOS、android端保持一致
  static const MethodChannel _channel = MethodChannel('demo_scan');

  /// 扫码
  static Future<String> scan() async => await _channel.invokeMethod("scan");

  /// dismiss扫码页面
  static Future dismiss() async => await _channel.invokeMethod("dismiss");

  ///  默认的实现
  Future<String?> getPlatformVersion() {
    return DemoScanPlatform.instance.getPlatformVersion();
  }
}
